<script>
  function getQueryStringByName(name){
    var result = location.search.match(new RegExp("[\?\&]" + name+ "=([^\&]+)","i"));
    if(result == null || result.length < 1){
      return "";
    }
    return result[1];
  }
  var url = 'http://' + window.location.host + ':8080/#/WxRegister?code='+ getQueryStringByName('code')+'&state='+ getQueryStringByName('state');
  window.location.href = url;
</script>
